import request from '@/utils/request'

/**
 * @description: 获取员工列表
 * @param {*} params {page:当前页,size：每页条数}
 * @return {*}
 */
export function getEmployeeList(page, size) {
  return request({
    method: 'get',
    url: '/sys/user',
    params: { page, size }
  })
}
export function addEmployee(data) {
  return request({
    method: 'post',
    url: '/sys/user',
    data
  })
}
export function delEmployee(id) {
  return request({
    method: 'delete',
    url: `/sys/user/${id}`
  })
}
// 批量导入员工
export function addEmployees(data) {
  return request.post('/sys/user/batch', data)
}
export const getUserInfoById = id => {
  return request.get(`/sys/user/${id}`)
}
